//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.graphite.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * 指标转化工具类
 */
public class MetricUtil {
    public MetricUtil() {
    }

    public static String getResourceId(String metricName) {
        String regex = "([a-zA-Z.]+)\\.([^.]+)\\..*";
        Pattern pattern = Pattern.compile(regex);
        Matcher matcher = pattern.matcher(metricName);
        String resourceId = null;
        if (matcher.find()) {
            resourceId = matcher.group(2);
        }
        return resourceId;
    }
}
